package io.renren.modules.sys.bottom;

/**
 * 下注状态
 *
 * @author wuxianji
 * @since 2017/11/11 上午11:38
 **/
public enum BottomStatusEnum {

    WAITING(1, "未开奖"),
    NOT_WIN(5, "未中奖"),
    WIN(10, "中奖")
    ;

    private int code;

    private String message;

    private BottomStatusEnum(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static BottomStatusEnum getByCode(int code) {
        for (BottomStatusEnum bottomStatusEnum : values()) {
            if (bottomStatusEnum.getCode() == code) {
                return bottomStatusEnum;
            }
        }
        return null;
    }
}
